package top.tenebrous.termbor.rpc.proxy.factory;

import top.tenebrous.termbor.rpc.proxy.config.ProxyConfig;
import top.tenebrous.termbor.rpc.spi.SPI;

/**
 * @program: termbor-rpc
 * @description:
 * @author: yazhang6
 * @create: 2024-05-23 08:45
 **/
@SPI
public interface ProxyFactory<T> {

    /**
     * 获取代理对象
     *
     * @param clazz
     * @return
     */
    T getProxy(Class<T> clazz);

    /**
     * 默认初始化方法
     *
     * @param proxyConfig
     */
    default void init(ProxyConfig<T> proxyConfig) {}
}
